SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 54089: Reading Microsoft Excel dates using a stored process input stream and the SAS® Add-In for Microsoft Office

DetailsAboutRate It

Beginning with the SAS Add-in 5.1 for Microsoft Office, you can use Microsoft Excel data as input for a stored process using the XML engine and input streams. For more information, see the paper "Excelling with Excel".

When the Excel data to be used as input for the stored process contains Excel dates, allowances must be made for the difference in how Excel and SAS® store these values. A SAS date is a numeric variable containing the number of days since January 1, 1960. An Excel date is the number of days since January 1, 1900. The difference in the number of days is 21,916. Therefore, the SAS stored process code must convert an Excel date to a SAS date by subtracting 21,916. For more information, see "Dating SAS and MS Excel".

As an alternative to converting the Excel date to a SAS date, you can format all of the Excel dates as text in Excel, and then use the Excel data as input for the stored process. In this case, SAS automatically converts the text date to a SAS date.

Starting in release 7.12, you no longer need to perform this conversion.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Add-in for Microsoft OfficeMicrosoft® Windows® for x645.17.129.4 TS1M3
Microsoft Windows 8 Enterprise 32-bit5.17.129.4 TS1M3
Microsoft Windows 8 Enterprise x645.17.129.4 TS1M3
Microsoft Windows 8 Pro 32-bit5.17.129.4 TS1M3
Microsoft Windows 8 Pro x645.17.129.4 TS1M3
Microsoft Windows 8.1 Enterprise 32-bit5.17.129.4 TS1M3
Microsoft Windows 8.1 Enterprise x645.17.129.4 TS1M3
Microsoft Windows 8.1 Pro5.17.129.4 TS1M3
Microsoft Windows 8.1 Pro 32-bit5.17.129.4 TS1M3
Microsoft Windows 95/985.1
Microsoft Windows 2000 Advanced Server5.1
Microsoft Windows 2000 Datacenter Server5.1
Microsoft Windows 2000 Server5.1
Microsoft Windows 2000 Professional5.1
Microsoft Windows NT Workstation5.1
Microsoft Windows Server 2003 Datacenter Edition5.1
Microsoft Windows Server 2003 Enterprise Edition5.1
Microsoft Windows Server 2003 Standard Edition5.1
Microsoft Windows Server 2003 for x645.1
Microsoft Windows Server 20085.17.129.4 TS1M3
Microsoft Windows Server 2008 R25.17.129.4 TS1M3
Microsoft Windows Server 2008 for x645.17.129.4 TS1M3
Microsoft Windows Server 2012 Datacenter5.17.129.4 TS1M3
Microsoft Windows Server 2012 R2 Datacenter5.17.129.4 TS1M3
Microsoft Windows Server 2012 R2 Std5.17.129.4 TS1M3
Microsoft Windows Server 2012 Std5.17.129.4 TS1M3
Microsoft Windows XP Professional5.1
Windows 7 Enterprise 32 bit5.17.129.4 TS1M3
Windows 7 Enterprise x645.17.129.4 TS1M3
Windows 7 Home Premium 32 bit5.17.129.4 TS1M3
Windows 7 Home Premium x645.17.129.4 TS1M3
Windows 7 Professional 32 bit5.17.129.4 TS1M3
Windows 7 Professional x645.17.129.4 TS1M3
Windows 7 Ultimate 32 bit5.17.129.4 TS1M3
Windows 7 Ultimate x645.17.129.4 TS1M3
Windows Millennium Edition (Me)5.1
Windows Vista5.1
Windows Vista for x645.1
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.